home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 2.toast / pc / sample code / quicktime / quicktime for java / musicmixer / src / mixer / mc / mixersoundtrack.java < prev   
Encoding:
Java Source  |  2000-06-23  |  1.3 KB  |  47 lines

  1. /*
  2.  * QuickTime for Java SDK Sample Code
  3.  
  4.    Usage subject to restrictions in SDK License Agreement
  5.  * Copyright: © 1996-1999 Apple Computer, Inc.
  6.  
  7.  */
  8. package mixer.mc;
  9.  
  10. import quicktime.*;
  11. import quicktime.app.audio.*;
  12. import quicktime.std.movies.media.*;
  13.  
  14. import javax.swing.*;
  15. import java.awt.*;
  16.  
  17. /** This class is an implementation of the MixerComponents interface designed
  18.  *  specially for SoundMedia.
  19.  */
  20. public class MixerSoundTrack implements MixerComponents {        
  21.     private AudioSpec master;
  22.     
  23.     /** The constructor just needs to know which SoundMedia object it's dealing with. */
  24.     public MixerSoundTrack (SoundMedia m) throws QTException {
  25.         master = new AudioMediaControl(m);
  26.     }
  27.  
  28.     /** Returns an AudioSpec object capable of controlling this object.
  29.      *  @return the AudioSpec control object
  30.      */
  31.     public AudioSpec getMaster () {
  32.         return master;
  33.     }
  34.     
  35.     /** Sound tracks can't have channels, so this returns null. */
  36.     public MixerComponents[] getChannels () {
  37.         return null;
  38.     }
  39.  
  40.     /** It is not possible to edit MixerSoundTracks, so this is null as well. */
  41.     public JComponent makeEditComponent () throws QTException {
  42.         return null;
  43.     }
  44.  
  45.     /** false is returned because it is not possible to edit MixerSoundTracks. */
  46.     public boolean isEditable() { return false; }
  47. }